Skip to content

Conversation

@jboolean
Copy link
Owner

Summary

  • update the frontend dependencies to react-router-dom v6 and add the standalone history helper
  • refactor the application router to use HistoryRouter/Routes and restructure layout rendering with outlets
  • migrate map, viewer, and admin flows to the v6 navigation APIs and replace legacy helpers

Testing

  • npm install
  • npm run lint (hangs locally and was aborted)

https://chatgpt.com/codex/tasks/task_e_68ed64e30a5c832993c373433e9ed684

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

Comment on lines +112 to +116
mapRef.current.remove();
mapRef.current = null;
}
};
}, [navigate, panOnClick, syncUI]);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Prevent map reinitialization on overlay/photo change

The useEffect that instantiates the MapLibre map depends on syncUI, but syncUI itself captures overlay and the current photo identifier. Every time the user toggles overlays or opens a different photo, this effect runs again, executes its cleanup, and rebuilds the entire map. That wipes the current zoom/center and forces all map tiles and handlers to reload, which did not happen before the router migration. The subsequent effect already updates the overlay and active photo on an existing map, so this initialization effect should run only once (or at most when panOnClick changes).

Useful? React with 👍 / 👎.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@codex adress this

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

Testing

  • ⚠️ npm run lint (fails in husky pre-commit because lint.sh hits a shell syntax error in this environment)

View task →

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants